package com.wbao.dianniu.ui;

import android.content.Intent;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.umeng.analytics.MobclickAgent;
import com.wbao.dianniu.logical.Const;
import com.wbao.dianniu.logical.GlobalContext;
import com.wbao.dianniu.R;

/**
 * 活动预览
 * 
 * @author yejianjun
 *
 */
public class ActPreviewActivity extends BaseActivity {
	private TextView tv_post;
	private TextView tv_Counts;
	private TextView tv_startDate;
	private TextView tv_price;
	private TextView tv_address;
	private TextView tv_describle;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentLayout(R.layout.activity_preview,LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT);
		setTitleName(getResources().getString(R.string.preview));
		init();
		Intent intent = getIntent();
		Bundle bundle = intent.getBundleExtra(Const.BUNDLE_DATA);
		if(null != bundle){
			tv_post.setText(bundle.getString(Const.BUNDLE_SUBJECT,""));
			tv_Counts.setText(bundle.getString(Const.BUNDLE_MAXPERSION, ""));
			tv_startDate.setText(bundle.getString(Const.BUNDLE_STARTDATE, ""));
			tv_price.setText(bundle.getString(Const.BUNDLE_PRICE, "") + "元/每人");
			tv_address.setText(bundle.getString(Const.BUNDLE_ADDRESS, ""));
			tv_describle.setText(bundle.getString(Const.BUNDLE_CONTENT, ""));
		}
	}

	private void init() {
		tv_post = (TextView) findViewById(R.id.act_preview_post);
		tv_Counts = (TextView) findViewById(R.id.act_preview_maxPersion);
		tv_startDate = (TextView) findViewById(R.id.act_preview_startDate);
		tv_price = (TextView) findViewById(R.id.act_preview_price);
		tv_address = (TextView) findViewById(R.id.act_preview_address);
		tv_describle = (TextView) findViewById(R.id.act_preview_content);
	}
	public void onResume() {
		super.onResume();
		MobclickAgent.onResume(this);
		}
		public void onPause() {
		super.onPause();
		MobclickAgent.onPause(this);
		}
}
